using Game.Networking.Client;
using MemoryPack;

namespace Game.Networking {
	public sealed class S_ProgramListMessageHandler : BaseServerMessageHandler {

		public override ServerPacketID CommandId {
			get {
				return ServerPacketID.ProgramFileListSend;
			}
		}

		public override void ProcessMessage(byte[] rawCommand) {
			var message = MemoryPackSerializer.Deserialize<S_ProgramListMessage>(rawCommand);
			ClientScriptingController.Instance.SetServerCodeFileList(message.ProgramList);
		}
	}
}
